package dongshi.daddy.main;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

/**
 * 使用zookeeper作为注册中心服务提供者主函数
 * [zk: localhost:2181(CONNECTED) 9] ls /dubbo/dongshi.daddy.service.ProviderService/providers
 * [dubbo://192.168.10.119:20823/dongshi.daddy.service.ProviderService?anyhost=true&application=dongshidaddy-provider&bean.name=dongshi.daddy.service.ProviderService&dubbo=2.0.2&generic=false&interface=dongshi.daddy.service.ProviderService&methods=SayHello&owner=dongshidaddy&pid=22736&side=provider×tamp=1637720936817]
 */
public class ProviderWithZkMain {
    public static void main(String[] args) throws IOException {
        //加载xml配置文件启动
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("META-INF/spring/provider-with-zk.xml");
        context.start();
        System.in.read(); // 按任意键退出
    }
}
